library(Seurat)
## Loading required package: ggplot2
## Loading required package: cowplot
## 
## Attaching package: 'cowplot'
## The following object is masked from 'package:ggplot2':
## 
##     ggsave
## Loading required package: Matrix
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
all10x.aligned <- readRDS('/projects/pytrik/sc_adipose/analyze_10x_fluidigm/data/10x-aligned')

Supra4 and Subq4

supra4_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Supra_4')]
subq4_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Subq_4')]

d1 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=supra4_cells, pt.size.use=0.1, cols.highlight = 'blue')

d2 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=subq4_cells, pt.size.use=0.1, cols.highlight = 'blue')

plot_grid(d1, d2)

Per subtissue

Peri

peri1_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Peri_1')]
peri2_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Peri_2')]
peri3_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Peri_3')]

d1 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=peri1_cells, pt.size.use=0.1, cols.highlight = 'blue')

d2 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=peri2_cells, pt.size.use=0.1, cols.highlight = 'blue')

d3 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=peri3_cells, pt.size.use=0.1, cols.highlight = 'blue')

plot_grid(d1, d2, d3)

Supra

supra1_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Supra_1')]
supra2_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Supra_2')]
supra3_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Supra_3')]

d1 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=supra1_cells, pt.size.use=0.1, cols.highlight = 'blue')

d2 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=supra2_cells, pt.size.use=0.1, cols.highlight = 'blue')

d3 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=supra3_cells, pt.size.use=0.1, cols.highlight = 'blue')

d4 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=supra4_cells, pt.size.use=0.1, cols.highlight = 'blue')

plot_grid(d1, d2, d3, d4)

Subq

subq1_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Subq_1')]
subq2_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Subq_2')]
subq3_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Subq_3')]
subq4_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Subq_4')]

d1 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=subq1_cells, pt.size.use=0.1, cols.highlight = 'blue')

d2 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=subq2_cells, pt.size.use=0.1, cols.highlight = 'blue')

d3 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=subq3_cells, pt.size.use=0.1, cols.highlight = 'blue')

d4 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=subq4_cells, pt.size.use=0.1, cols.highlight = 'blue')

plot_grid(d1, d2, d3, d4)

Visce

visce1_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Visce_1')]
visce2_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Visce_2')]
visce3_cells <- rownames(all10x.aligned@meta.data)[which(all10x.aligned@meta.data$sample_name %in% 'Visce_3')]

d1 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=visce1_cells, pt.size.use=0.1, cols.highlight = 'blue')

d2 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=visce2_cells, pt.size.use=0.1, cols.highlight = 'blue')

d3 <- DimPlot(all10x.aligned, reduction.use='tsne', cells.highlight=visce3_cells, pt.size.use=0.1, cols.highlight = 'blue')

plot_grid(d1, d2, d3)